package com.butterfly.rest.resource.restlet.status;


import org.restlet.Request;
import org.restlet.Response;
import org.restlet.data.Status;
import org.restlet.representation.Representation;
import org.restlet.service.StatusService;
import org.springframework.beans.factory.annotation.Autowired;

public class AdXStatusService extends StatusService {

	@Autowired
	private ErrorUtil errorUtil;

	@Override
	public Representation getRepresentation(Status status, Request request,
											Response response) {
		return errorUtil.generateErrorMessage(status);
	}

	@Override
	public Status getStatus(Throwable throwable, Request request, Response response) {
		return errorUtil.getStatus(throwable);
	}
}
